home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 633 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.7 KB

  1. Path: newsfeed.gsfc.nasa.gov!usenet
  2. From: koehler@bessta.gsfc.nasa.gov (Bob Koehler)
  3. Newsgroups: vmsnet.sources.d,comp.lang.c++
  4. Subject: Re: Problem Reading Records
  5. Date: 5 Jan 1996 14:19:08 GMT
  6. Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
  7. Distribution: world
  8. Message-ID: <4cjc0s$o6c@post.gsfc.nasa.gov>
  9. References: <4ceh2g$9hd@govonca3.gov.on.ca>
  10. Reply-To: koehler@bessta.gsfc.nasa.gov (Bob Koehler)
  11. NNTP-Posting-Host: bessta.gsfc.nasa.gov
  12.  
  13.  
  14. In article <4ceh2g$9hd@govonca3.gov.on.ca>, dcassidy@ottawa.net (Derick) writes:
  15. >Hi...
  16. >
  17. >This is going to sound like a real dumb question.  First of all, let
  18. >me give you some background.  I am new to the VMS programming
  19. >environment (but not programming in general) and am having some
  20. >problems using RMS with C/C++
  21. >
  22. >Here is a screen capture of what the file details are:
  23. >
  24. >REG.DBS;1                     File ID:  (34902,27,0)
  25. >Size:         2828/2828       Owner:    [CASSIDYD]
  26. >Created:   10-AUG-1995 08:21:32.19
  27. >Revised:    3-JAN-1996 12:27:32.90 (3659)
  28. >Expires:   <None specified>
  29. >Backup:    <No backup recorded>
  30. >Effective: <None specified>
  31. >Recording: <None specified>
  32. >File organization:  Indexed, Prolog: 3, Using 2 keys
  33. >Shelved state:      Online
  34. >File attributes:    Allocation: 2828, Extend: 0, Maximum bucket size:
  35. >4
  36. >                    Global buffer count: 0, No version limit
  37. >                    Contiguous best try
  38. >Record format:      Variable length, maximum 1960 bytes
  39. >Record attributes:  Carriage return carriage control
  40. >RMS attributes:     None
  41. >Journaling enabled: None
  42. >File protection:    System:RWED, Owner:RWED, Group:RE, World:R
  43. >Access Cntrl List:  None
  44. >Total of 1 file, 2828/2828 blocks.
  45. >
  46. >What i am trying to do seems very simple.  I would like to extract all
  47. >the records in the REG.DBS file and output them to a standard ASCII
  48. >file that I can port to my PC.  I will then do some analysis on the
  49. >file.
  50. >
  51. >Is reading the records as easy as a sys$get(&fab) command?  Or do i
  52. >have to do a whole lot more?
  53. >
  54.  
  55. You should be able to open them as if they were simple sequential files
  56. and RMS should present the data records to you as if they had been sorted by
  57. key.  For example, if the files are ASCII, you should be able to TYPE them, and
  58. not worry about the keys.  Also CONVERT (accessable via CONV$ utility routines)
  59. can convert the file from keyed to sequential for you.
  60.  
  61. First of all, try doing a simple fopen and see what you get.  Even if you find
  62. you have to add RMS options to the fopen to get the file open, you should be
  63. able to use non-keyed read functions once it's open.
  64.  
  65. And yes, if you want to , you can sys$get(&fab).
  66.  
  67. ------------------------------------------------------------------------------
  68. Bob Koehler                     | CSC/SSD/MITG
  69.  
  70.